home *** CD-ROM | disk | FTP | other *** search
- function loadImage(mc, node, extrapath)
- {
- var _loc3_ = extrapath;
- if(_loc3_ == null)
- {
- _loc3_ = "";
- }
- var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
- var _loc1_ = node.firstChild.nodeValue;
- var _loc2_ = node.attributes.path;
- if(_loc2_ != null)
- {
- _loc1_ = _loc2_ + _loc1_;
- }
- else
- {
- _loc1_ = strDefaultPath + _loc3_ + _loc1_;
- }
- if(strPathPrefix == null)
- {
- strPathPrefix = "";
- }
- mc.loadMovie(strPathPrefix + _loc1_);
- }
- function init()
- {
- build();
- }
- function build()
- {
- var _loc1_ = Tardis.Colors;
- DEFAULT_COLOR = _loc1_.getHex("default");
- imageToLoad = nodeData.byName("image");
- loadImage(this.mc_image,imageToLoad);
- intervalID = setInterval(this,"checkLoad",300);
- }
- function checkLoad()
- {
- var _loc1_ = this;
- if(_loc1_.mc_image._width > 0)
- {
- var _loc3_ = nodeData.byName("note");
- if(_loc3_.getText() != null)
- {
- _loc1_.noteFF.htmlText = nodeData.byName("note").getText();
- _loc1_.noteFF._x = _loc1_.mc_image._width;
- _loc1_.noteFF._y = _loc1_.mc_image._height + 2;
- _loc1_.noteFF.textColor = DEFAULT_COLOR;
- _loc1_.noteFF.autosize = left;
- }
- var _loc2_ = nodeData.byName("caption").getText();
- if(_loc2_ != null)
- {
- _loc1_.captionFF.htmlText = _loc2_;
- _loc1_.captionFF._y = _loc1_.mc_image._height + 3;
- _loc1_.captionFF.textColor = DEFAULT_COLOR;
- }
- clearInterval(intervalID);
- _loc1_._visible = true;
- _loc1_.mc_image._visible = true;
- }
- else
- {
- imgCounter++;
- if(imgCounter == 20)
- {
- loadImage(_loc1_.mc_image,imageToLoad);
- imgCounter = 0;
- }
- }
- }
- _visible = false;
- var onComplete = null;
- var imgCounter = 0;
- this.onUnload = function()
- {
- clearInterval(intervalID);
- };
- mc_image.onLoad = function()
- {
- var _loc1_ = this;
- _loc1_._parent._visible = true;
- if(_loc1_._parent.nodeData.attributes.flash == "true")
- {
- _loc1_._parent.play();
- }
- _parent.onComplete();
- };
- stop();
- onReady();
-